From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 11:13:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0001.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:54 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 15:13:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0002.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 15:21:17 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0003.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:42 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0004.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:43 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:43 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 13 20:01:44 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:22 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0005.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 08:02:23 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0006.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:48 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 12:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0007.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0008.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 14 20:00:45 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0009.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:09 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 08:02:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:53 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 12:00:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0010.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 12:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 12:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0011.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:45 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 16:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0012.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:45 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 15 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0013.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:33 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 08:02:33 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 08:02:34 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0014.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 12:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0015.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 16:00:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:45 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0016.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 16 20:00:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:35 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 08:02:35 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0017.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:35 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 08:02:36 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0018.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:03 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 12:01:03 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:51 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0019.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 16:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0020.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:53 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 17 20:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0021.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:20 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 08:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0022.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:06 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:06 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 12:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:31 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 16:01:31 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0023.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:31 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 16:01:31 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:31 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 16:01:32 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0024.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:57 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 18 20:00:57 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0025.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:41 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 08:04:41 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0026.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 12:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 16:03:03 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0027.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:03 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 16:03:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:03 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 16:03:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 16:03:03 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:04 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 16:03:04 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 19 16:03:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 16:03:06 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0028.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 19 20:00:51 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:08 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0029.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:10 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 08:07:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 08:07:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:11 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 08:07:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:06 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0030.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:07 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 12:02:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 12:02:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0031.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 16:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0032.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:49 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 20 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0033.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:03:55 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 08:03:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0034.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0035.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:53 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 16:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0036.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 21 20:00:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0037.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:48 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 08:02:48 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0038.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:53 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 12:00:53 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0039.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:23 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:23 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 16:01:24 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0040.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:18 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 22 20:01:18 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 22 20:01:19 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0041.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:43 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:43 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:44 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 08:02:45 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0042.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 12:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 16:01:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0043.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:51 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:51 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 16:01:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0044.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 23 20:00:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0045.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:16 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 08:03:17 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 12:03:02 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0046.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:03 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 12:03:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:03 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 12:03:05 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0047.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:25 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 16:01:26 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:57 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 20:01:57 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0048.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:57 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 24 20:01:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:05 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 08:02:05 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0049.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:06 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 08:02:06 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:03 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 12:01:03 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0050.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:03 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0051.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:02 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 16:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0052.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Jan 25 20:00:55 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:51 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0053.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:53 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 08:05:53 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 08:05:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0054.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:07 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 12:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0055.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0056.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:48 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Jan 26 20:00:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:47 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0057.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:48 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:48 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:49 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 08:06:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0058.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:12 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 27 12:02:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 12:02:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0059.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:08 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:57 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0060.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:00:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Jan 27 20:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:44 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 08:05:44 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0061.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:44 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 08:05:44 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:44 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 08:05:44 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 08:05:45 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0062.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:56 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 12:01:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0063.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 16:00:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 20:00:58 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0064.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:58 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 20:00:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Jan 28 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0065.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:35 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 08:07:35 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 08:07:36 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0066.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:02 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 12:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 12:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0067.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:55 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 16:00:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0068.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Jan 29 20:00:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:08:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0069.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:01 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:01 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 08:09:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0070.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:58 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:58 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 12:03:59 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:15 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0071.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:16 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 16:04:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0072.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:16 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Jan 30 20:02:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0073.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:56 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 08:07:56 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 08:07:57 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:19 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 12:04:19 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0074.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:19 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:20 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 12:04:20 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:21 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 16:02:21 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0075.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:21 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 16:02:21 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:21 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 16:02:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0076.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:10 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:10 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 20:01:11 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Jan 31 20:01:11 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 20:01:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Jan 31 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:51 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 08:09:52 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0077.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:52 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 08:09:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:52 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 08:09:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:53 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 08:09:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:54 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 08:09:54 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0078.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0079.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:09 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 16:01:09 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0080.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:02 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 1 20:01:02 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:51 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 08:12:53 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0081.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:53 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 08:12:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:53 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 08:12:53 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 08:12:54 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:55 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 08:12:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:56 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 08:12:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:12:56 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 08:12:56 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0082.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:52 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 12:02:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0083.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:14 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0084.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:03 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 2 20:01:03 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 2 20:01:05 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:23 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 08:12:23 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0085.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:24 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:24 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 08:12:25 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0086.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:43 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 12:02:43 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0087.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:05 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:05 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 16:01:06 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0088.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:10 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 20:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 3 20:01:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:07 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0089.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:09 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:08:10 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 08:08:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0090.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 12:02:47 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0091.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:14 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 16:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0092.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:07 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 4 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0093.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:07:59 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 08:07:59 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 08:08:00 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0094.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0095.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:11 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 16:01:11 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 16:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0096.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:01 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 5 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:25 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 08:15:29 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0097.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:29 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 08:15:29 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:30 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 08:15:30 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 08:15:30 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:15:30 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 08:15:30 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:31 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:31 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 08:15:31 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 08:15:33 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:33 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 08:15:35 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:15:35 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 08:15:35 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0098.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:46 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 12:02:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0099.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:09 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 16:01:09 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0100.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 6 20:01:04 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:51 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 08:23:55 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0101.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:55 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 08:23:55 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:23:55 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:56 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 08:23:57 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:23:58 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 08:23:58 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:21 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0102.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:22 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 12:03:22 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0103.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:12 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 16:01:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0104.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:08 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 7 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:46 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 08:22:49 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0105.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:49 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:22:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 8 08:22:51 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 08:22:52 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0106.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:25 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 12:03:25 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0107.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:16 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 16:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:07 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0108.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 8 20:01:08 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:26 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 08:09:26 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0109.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:27 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 08:09:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 08:09:28 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0110.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:17 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 12:03:17 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 12:03:18 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0111.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:17 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 9 16:01:17 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 16:01:18 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0112.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:12 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 9 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 9 20:01:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:16 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 08:20:19 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0113.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:19 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 08:20:20 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:21 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 08:20:22 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 08:20:23 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:20:24 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 08:20:24 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:25 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:26 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 08:20:26 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:27 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 08:20:28 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:20:28 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 08:20:28 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:41 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 12:03:41 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0114.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:41 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 12:03:41 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:42 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 12:03:42 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:12 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 16:01:12 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0115.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:12 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 16:01:13 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:13 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 16:01:13 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 16:01:13 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0116.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:16 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Feb 10 20:01:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:57 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0117.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:12:59 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 08:12:59 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 08:13:00 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0118.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:41 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:41 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 12:02:42 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0119.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:08 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 16:01:08 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 16:01:09 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 16:01:10 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0120.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:00 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:00 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sat Feb 11 20:01:01 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:27 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 08:09:28 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0121.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:28 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 08:09:28 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:28 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 12 08:09:29 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 08:09:30 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0122.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:50 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:50 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 12:02:51 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0123.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:13 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:13 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 16:01:14 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0124.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:06 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Sun Feb 12 20:01:06 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Sun Feb 12 20:01:07 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:12 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 08:17:13 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0125.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:13 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 08:17:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:14 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 08:17:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 08:17:14 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:17:14 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 08:17:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 08:17:16 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:10 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 12:03:11 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0126.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:11 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 12:03:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:11 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 12:03:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 12:03:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0127.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:29 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 16:01:29 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 16:01:30 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:09 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 20:01:09 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0128.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:09 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 20:01:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:11 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 20:01:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Feb 13 20:01:11 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Mon Feb 13 20:01:12 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:27 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 08:19:29 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0129.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:29 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 08:19:29 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:29 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:30 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 08:19:31 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:19:33 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 08:19:33 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:25 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0130.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:26 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 12:03:26 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:33 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0131.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:34 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 16:01:34 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0132.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:14 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Tue Feb 14 20:01:14 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Tue Feb 14 20:01:15 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:03 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 08:28:10 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0133.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:10 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 08:28:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:10 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 08:28:10 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 08:28:12 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:13 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 08:28:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:28:13 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 08:28:13 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:31 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 12:05:31 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0134.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:31 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 12:05:31 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:32 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 12:05:32 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0135.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:36 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 16:01:37 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0136.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:11 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 19:28:11 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:43 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 20:13:43 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0137.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:43 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 20:13:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:43 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 20:13:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 20:13:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Wed Feb 15 20:13:46 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:31 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 16 08:46:35 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0138.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:35 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 16 08:46:35 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:35 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 16 08:46:35 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Thu Feb 16 08:46:35 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 16 08:46:36 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Thu Feb 16 08:46:38 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:39 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 16 08:46:39 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:46:39 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Thu Feb 16 08:46:39 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users From mal at egenix.com Thu Apr 1 21:14:57 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:43 2006 Subject: [egenix-users] Installation woes In-Reply-To: <20040331140944.M30618@www.flemingcnc.com> References: <20040331140944.M30618@www.flemingcnc.com> Message-ID: <406C5C21.7000100@egenix.com> todd wrote: > First my configuration: > Windows XP > Zope 2.7.0 > Zope installation directory is C:\Program Files\Zope-2.7.0 > Instance directory is C:\Zope > > Zope on my system is a fresh install, not an upgrade. I didn't install the > instance as a service; I use runzope.bat > > The files I downloaded: > Zope-2.7.0-win32.exe (from zope.org) > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip (from egenix) > > The first problem I ran into is conflicting installation instructions. > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html says this: > 3. Unzip the distribution in the Zope Instance's home directory (i.e. where > you find the Zope's lib/, bin/, etc. directories). > > The email sent with my commercial license says this: > * Unzip the binary distribution of the package in the Zope > installation's home directory (ie. where you find the Zope's > lib/, bin/, etc. directories). > > Ok, where should I put it? The installation directory or the instance > directory? Why do the instructions call these "home" directories? home > directories, under both UNIX and Windows, refer to user directories, not > product directories. Before Zope 2.7 there was no distinction between the Zope installation directory and the instance directory, which is why the instructions use those terms for both. Zope 2.7 introduced this distinction and that's where the confusion is coming from: The current version 1.0.8 of the eGenix Zope DA for Python 2.3 (which Zope 2.7 requires) still comes with the directory layout that was used all the years before 2.7 and which many of our users are still very comfortable with. We will provide new versions of the Zope DA which will support the installation into the Zope instance directory directly, but there is no time frame for those versions yet. That said, the existing eGenix Zope DA 1.0.8 *does* work just fine with Zope 2.7 provided you unzip the distribution into Zope 2.7 *installation* directory, e.g. C:\Zope and then copy the license files into the directory C:\Zope\mx\ODBC. Sorry for the confusion, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 01 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 14 days left EuroPython 2004, G?teborg, Sweden 66 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Fri Apr 2 13:13:45 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Mar 31 16:33:43 2006 Subject: [egenix-users] Installation problem Message-ID: I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? I'm getting pretty frustrated, as this is the only commercial package I've ever bought for Python, and so far it hasn't worked. There's no way I'm going to purchase a support ticket to get the product working. Thanks, Chris-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20040402/05211d15/attachment-0139.htm From mal at egenix.com Fri Apr 2 21:26:01 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:43 2006 Subject: [egenix-users] Installation problem In-Reply-To: References: Message-ID: <406DB039.8040601@egenix.com> Chris McAvoy wrote: > I downloaded the 2.7.0 / py 2.3 version of the driver, and have already purchased a license. When I try and start up zope, I get an error "Python21.dll not found". Is the link wrong on the web page? If you are working on Windows that it is possible that Zope picks up an already installed Python version 2.1. However, Zope 2.7 needs Python 2.3 to work correctly and that's also why we point you at the Python 2.3 version of the Zope DA for Zope 2.7. We have had a few reports of people having similiar problems. In all cases, Zope was picking up a wrong Python version. Please make sure that Zope is indeed running on Python 2.3 and then try again. If the problem persists, please send in the complete traceback to support@egenix.com. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 02 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 13 days left EuroPython 2004, G?teborg, Sweden 65 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Mar 31 16:33:43 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From charlie at egenix.com Sat Apr 3 16:56:38 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:43 2006 Subject: Fwd: [egenix-users] Permission woes Message-ID: <20040403155638.1632.4@wonderland.1080986781.fake> Marc-Andr?, I can't answer this on my own. Is it possible to call the connection like this from PythonScripts or is the only possible for external methods? I've checked the documentation and it seems that you only get to work with ZopeConnection objects which have the get_connection() method. Otherwise it would be possible to use .execute() and .query() methods on a connection object directly. The only other thing I know about using SQL directly from PythonScripts is to import SQL from ZSQL.... Please help me understand this! ;-) Charlie On [egenix-users] Permission woes at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mcavoy76 at hotmail.com Fri Apr 2 17:41:08 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Re: [egenix-support] Installation problem References: <406DB673.3000705@egenix.com> Message-ID: Ok...done...thanks a bunch for your help. I had the license in the wrong place. Chris ----- Original Message ----- From: "M.-A. Lemburg" To: "Chris McAvoy" Cc: Sent: Friday, April 02, 2004 12:52 PM Subject: Re: [egenix-support] Installation problem > Chris McAvoy wrote: > > Thanks very much for the fast reply. Here's the info from my control panel > > (after removing the product): > > > > Zope Version (Zope 2.7.0, python 2.3.3, win32) > > Python Version 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit > > (Intel)] > > System Platform win32 > > SOFTWARE_HOME C:\Program Files\Zope-2.7.0\lib\python > > ZOPE_HOME C:\Program Files\Zope-2.7.0 > > INSTANCE_HOME C:\Zope-Instance > > CLIENT_HOME C:\Zope-Instance\var > > Network Services ZServer.FTPServer.FTPServer (Port: 8021) > > ZServer.HTTPServer.zhttp_server (Port: 8080) > > > > Process Id 3128 (3100) > > Running For 18 sec > > > > > > Here's the trace when I try to start Zope with the product in place: > > > > C:\Zope-Instance\bin>runzope.bat > > > > C:\Zope-Instance\bin>"C:\Program Files\Zope-2.7.0\bin\python.exe" > > "C:\Program Fi > > les\Zope-2.7.0\lib\python\Zope\Startup\run.py" -C > > "C:\Zope-Instance\etc\zope.con > > f" > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer HTTP server started at Fri Apr 02 > > 12:36:22 2 > > 004 > > Hostname: usscscopensys03.lasalle.na.abnamro.com > > Port: 8080 > > ------ > > 2004-04-02T12:36:22 INFO(0) ZServer FTP server started at Fri Apr 02 > > 12:36:22 20 > > 04 > > Hostname: usscscopensys03 > > Port: 8021 > > ------ > > 2004-04-02T12:36:25 ERROR(200) Zope Could not import Products.ZODBCDA > > Note that this traceback originated from the Zope Corporation's > ZODBC DA product, not the eGenix one. The ZODBC Zope DA from > Zope Corp is compiled against Python 2.1 and will not work > in Zope 2.7. by contrast, our mxODBCZopeDA is available > for all Zope versions since 2.3. > > The mxODBC Zope DA is available from this page: > > http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download > > Please make sure that you download the file: > > http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zi p > > Please unzip this file to your Zope 2.7 *installation* > directory (not the instance directory), e.g. > C:\Programs\Zope-2.7.0\ > > Then copy the license files to the lib\python\mx\ODBC > directory in that installation directory and restart > Zope. > > You will then see the eGenix mxODBC Zope DA listed in the > "Add" drop-down list. > > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > Traceback (most recent call last): > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 49, in > > ? > > run() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\run.py", line > > 19, in > > run > > start_zope(opts.configroot) > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 5 > > 1, in start_zope > > starter.startZope() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\Startup\__init__.py", > > line 2 > > 30, in startZope > > Zope.startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\__init__.py", line 46, > > in st > > artup > > _startup() > > File "C:\Program Files\Zope-2.7.0\lib\python\Zope\App\startup.py", line > > 45, in > > startup > > OFS.Application.import_products() > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 631, in > > import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "C:\Program Files\Zope-2.7.0\lib\python\OFS\Application.py", line > > 654, in > > import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "C:\Program > > Files\Zope-2.7.0\lib\python\Products\ZODBCDA\__init__.py", li > > ne 91, in ? > > import DA > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\DA.py", line > > 92, > > in ? > > from db import DB, manage_ODBCDataSources > > File "C:\Program Files\Zope-2.7.0\lib\python\Products\ZODBCDA\db.py", line > > 86, > > in ? > > from sql import * > > ImportError: DLL load failed: The specified module could not be found. > > > > I checked the version of python that zope has in its installation directory: > > > > C:\Program Files\Zope-2.7.0\bin>./python.exe > > '.' is not recognized as an internal or external command, > > operable program or batch file. > > > > C:\Program Files\Zope-2.7.0\bin>python > > Python 2.3.3 (#51, Feb 11 2004, 15:18:58) [MSC v.1200 32 bit (Intel)] on > > win32 > > Type "help", "copyright", "credits" or "license" for more information. > > > > > > > > > > Thanks, > > Chris > > > > ----- Original Message ----- > > From: "M.-A. Lemburg" > > To: "Chris McAvoy" > > Cc: > > Sent: Friday, April 02, 2004 12:26 PM > > Subject: Re: [egenix-users] Installation problem > > > > > > > >>Chris McAvoy wrote: > >> > >>>I downloaded the 2.7.0 / py 2.3 version of the driver, and have already > > > > purchased a license. When I try and start up zope, I get an error > > "Python21.dll not found". Is the link wrong on the web page? > > > >>If you are working on Windows that it is possible that Zope > >>picks up an already installed Python version 2.1. However, > >>Zope 2.7 needs Python 2.3 to work correctly and that's also > >>why we point you at the Python 2.3 version of the Zope DA > >>for Zope 2.7. > >> > >>We have had a few reports of people having similiar problems. > >>In all cases, Zope was picking up a wrong Python version. > >> > >>Please make sure that Zope is indeed running on Python 2.3 > >>and then try again. If the problem persists, please send in > >>the complete traceback to support@egenix.com. > >> > >>Thanks, > >>-- > >>Marc-Andre Lemburg > >>eGenix.com > >> > >>Professional Python Services directly from the Source (#1, Apr 02 2004) > >> >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >> >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >>________________________________________________________________________ > >>Python UK 2004, Oxford, UK 13 days left > >>EuroPython 2004, G?teborg, Sweden 65 days left > >> > >>::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > >> > > > > > > ______________________________________________________________________ > > eGenix Support Team support@egenix.com > > http://www.egenix.com/ > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 02 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > Python UK 2004, Oxford, UK 13 days left > EuroPython 2004, G?teborg, Sweden 65 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: > ______________________________________________________________________ eGenix Support Team support@egenix.com http://www.egenix.com/ From mcavoy76 at hotmail.com Sat Apr 3 17:35:13 2004 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] [SUMMARY] Installation problem resolved Message-ID: It looks like I had the wrong files, in the wrong places. After some help from support, everything was resolved. Thanks! Here's the summary: ####################### The mxODBC Zope DA is available from this page: http://www.egenix.com/files/python/mxODBC-Zope-DA.html#Download Please make sure that you download the file: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip Please unzip this file to your Zope 2.7 *installation* directory (not the instance directory), e.g. C:\Programs\Zope-2.7.0\ Then copy the license files to the lib\python\mx\ODBC directory in that installation directory and restart Zope. You will then see the eGenix mxODBC Zope DA listed in the "Add" drop-down list. ######################## Chris From charlie at egenix.com Tue Apr 6 17:25:12 2004 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Permission woes In-Reply-To: <20040331153539.M5210@www.flemingcnc.com> References: <20040331153539.M5210@www.flemingcnc.com> Message-ID: <20040406162512.4126.28@wonderland.1081236964.fake> Dear Todd, sorry for our delay in replying to this. I'm also cc'ing it to the Zope-DB list as it might be of interest to users there as well. The reason is that the objects in question (DatabaseConnection objects returned by the ZopeConnect object) do not define any security information and Zope then restricts access by default. There are three solutions to this: 1) the standard Zope approach from Products.ZSELMethods.SQL import SQL methodId = 'sqlListEmployees' setattr(self, methodId, SQL(methodId, '', 'employeesDB', 'Select * FROM employees')) result =self.sqlListEmployees() which will work with any ZopeDA 2) adjusting security settings to allow PythonScripts to do this kind of thing. As this isn't to be encouraged as it applies to all PythonScripts we won't give the details here. 3) Use an external Method. This has the advantage of being much finer grained conrtol than allowing all PythonScripts to do something but done properly is nearly as flexible. Create a file in ~/Extensions say ODBC_SQL.py This is essentially needs only one function: def callSQL(connectionObject, statement): conn = connectionObject.database_connection() return conn.execute(statement) Create an external method say SQL which points to callSQL in ODBC_SQL You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = """select [Building ID] from [Buildings] where [Building Name] = ?""", building)[1] columns, results = context.SQL(container.crc_db, statement) Hope that helps. Charlie Clark On 2004-03-31 at 17:52:11 [+0200], todd wrote: > My configuration: > Windows XP > Zope 2.7.0 > egenix-mxodbc-zopeda-1.0.8.win32-py2.3.zip > > I created an mxODBC Database Connection (called "crc_db") to an existing > Access database. I created Z SQL Methods and sucessfully called them from a > Python script. However, I can't get .execute() to work on a connection. Here > is the code portion that's giving me problems: > > connection = container.crc_db.get_connection() > building_rowset = connection.execute('select [Building ID] from [Buildings] > where [Building Name] = ?', building)[1] > > Whenever this code runs, a dialog box pops up in the web browser asking the > user to log in. The dialog doesn't accept my Zope account (user todd). > Escaping from the dialog produces this message: > > Error Type: Unauthorized > Error Value: You are not allowed to access 'execute' in this context > > I tried giving the script the Manager and Owner proxy roles, but this didn't > change the behavior. The script, the connection, and the containing folder > all > belong to user todd. -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 15:26:13 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] On demand connect Message-ID: Dear egenix users, I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a while I get the following error message while executing a query from zope: Error Type: ProgrammingError Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during query', 5923) I found that this happens when no query has been executed for 1800 seconds (mysql wait-timeout variable). I also get this message when I manually kill the connection from mysql. If I execute the same query again it will run succesful. I thought that using the "Use Connect on Demand" option would reconnect to mysql automaticly. It does reconnect but only after raising a ProgrammingError at the first query which gets excecuted after a lost connection. Does anybody know how to fix this? Many thanks, Fedor Baart SFK From mal at egenix.com Tue Apr 13 16:07:24 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] On demand connect In-Reply-To: References: Message-ID: <407BE60C.4010303@egenix.com> F.Baart@SFK.NL wrote: > Dear egenix users, > > > I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a > while I get the following error message while executing a query from zope: > > > Error Type: ProgrammingError > Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 > Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during > query', 5923) > > > I found that this happens when no query has been executed for 1800 seconds > (mysql wait-timeout variable). I also get this message when I manually kill > the connection from mysql. If I execute the same query again it will run > succesful. > > > I thought that using the "Use Connect on Demand" option would reconnect to > mysql automaticly. It does reconnect but only after raising a > ProgrammingError at the first query which gets excecuted after a lost > connection. > > > Does anybody know how to fix this? The Zope DA automatically reconnects in case it gets an OperatingError from the database (which is what the database driver should generate for these kinds of errors). The error that MySQL uses a generic error HY0000 which could be anything from connection problems to interface problems or programming errors. The driver *should* have sent HYT00 or HYT01. The next version of the Zope DA will have an option that allows doing an alive check on the connection before trying to execute a statement (more expensive, but needed in order to support auto-reconnect with some ODBC drivers). Another thing you could try is report this as bug to MySQL and have them generate the correct error code for the timeout. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Tue Apr 13 16:28:51 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] On demand connect In-Reply-To: <407BE60C.4010303@egenix.com> References: <407BE60C.4010303@egenix.com> Message-ID: <407BEB13.6020800@egenix.com> M.-A. Lemburg wrote: > F.Baart@SFK.NL wrote: > >> Dear egenix users, >> >> >> I use mx.ODBC.Zope DA 1.0.8 with mysql 4.0.14 on zope 2.6.1. Once in a >> while I get the following error message while executing a query from >> zope: >> >> >> Error Type: ProgrammingError >> Error Value: ('HY000', 2013, '[MySQL][ODBC 3.51 >> Driver][mysqld-4.0.14-standard]Lost connection to MySQL server during >> query', 5923) >> >> >> I found that this happens when no query has been executed for 1800 >> seconds >> (mysql wait-timeout variable). I also get this message when I manually >> kill >> the connection from mysql. If I execute the same query again it will run >> succesful. >> >> >> I thought that using the "Use Connect on Demand" option would >> reconnect to >> mysql automaticly. It does reconnect but only after raising a >> ProgrammingError at the first query which gets excecuted after a lost >> connection. >> >> >> Does anybody know how to fix this? > > > The Zope DA automatically reconnects in case it gets an > OperatingError from the database (which is what the database > driver should generate for these kinds of errors). > > The error that MySQL uses a generic error HY0000 which could > be anything from connection problems to interface problems > or programming errors. The driver *should* have sent HYT00 > or HYT01. > > The next version of the Zope DA will have an option that > allows doing an alive check on the connection before trying > to execute a statement (more expensive, but needed > in order to support auto-reconnect with some ODBC > drivers). > > Another thing you could try is report this as bug to MySQL > and have them generate the correct error code for the > timeout. I just remembered a trick that might help in the meantime: You can change the mapping of ODBC error codes to exceptions that mxODBC uses internally by accessing the ODBC sub-package's .errorclass dictionary, e.g. import mx.ODBC.Windows mx.ODBC.Windows.errorclass['HY000'] = mx.ODBC.Windows.OperationalError will map the generic error to an OperationalError which triggers the auto-reconnect in the Zope DA (on Windows). -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 13 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ Python UK 2004, Oxford, UK 2 days left EuroPython 2004, G?teborg, Sweden 54 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From F.Baart at SFK.NL Tue Apr 13 17:21:11 2004 From: F.Baart at SFK.NL (F.Baart@SFK.NL) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] On demand connect Message-ID: Hello egenix-users, I filed a bug report on mysql concerning the previous mentioned issue. (http://bugs.mysql.com/bug.php?id=3456) Fedor Baart From lalleman at mfps.com Mon Apr 26 21:23:58 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Hello all, I recently came across a problem with the mx.DateTime module. I simplified my problem down to the following: PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32. >>> import mx.DateTime >>> dt = mx.DateTime.DateTime(2065) >>> dt.localtime() <--- Interpreter crashes here ---> The crash manager in Windows indicates that the problem occurred in mxdatetime.pyd. I have tried this on three different machines. 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime version 2.0.3. 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") The interrupter crashed on both of the Windows machines. My Linux machine did not crash, it simply said that the mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly incorrect, but better than crashing, I guess. It would appear that localtime() is an OS-dependant thing. I'm not sure if this is the correct place to ask questions about bugs. I know that there is a commercial support area, but I not currently a customer and mx.DateTime is freely available. (FYI: I am considering the purchase of the mxODBC module). Anyways, I can hack around this bug myself for the time being, but I figured that this may be something that the authors would like to fix, assuming that what I found is really a bug. A interpreter crash is never fun. Thanks, - Lowell From mal at egenix.com Tue Apr 27 09:54:03 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) In-Reply-To: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> References: <2F7747120C62D211AD4100805FA78E1AE69AB7@mail2.mfps.com> Message-ID: <408E038B.6030304@egenix.com> Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From lalleman at mfps.com Tue Apr 27 09:45:12 2004 From: lalleman at mfps.com (Alleman, Lowell) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Possible bug: DateTime.localtime() crash wit h the year 2065 (Wi n32 platform) Message-ID: <2F7747120C62D211AD4100805FA78E1AE69AB9@mail2.mfps.com> I'll be sure to give egenix-mx-base 2.1 a try when it becomes available. I would much rather deal with an exception or even the wrong value, rather than an interpreter crash. Thanks again, Lowell Alleman -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: Tuesday, April 27, 2004 2:54 AM To: Alleman, Lowell Cc: 'egenix-users@lists.egenix.com' Subject: Re: [egenix-users] Possible bug: DateTime.localtime() crash with the year 2065 (Wi n32 platform) Alleman, Lowell wrote: > Hello all, > > I recently came across a problem with the mx.DateTime module. I simplified > my problem down to the following: > > > > PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on > win32. > >>>>import mx.DateTime >>>>dt = mx.DateTime.DateTime(2065) >>>>dt.localtime() > > > <--- Interpreter crashes here ---> > > > > The crash manager in Windows indicates that the problem occurred in > mxdatetime.pyd. I have tried this on three different machines. > > 1. Windows XP, Python 2.3.3, with PythonWin build 200, and mx.DateTime > version 2.0.3. > 2. Windows 2000, Active Python 2.3.2 build 232, and mx.DateTime 2.0.3 > 3. SuSE Linux 9.0, "Python 2.3+", and mx.DateTime 2.0.3. (I'm not exactly > sure what "Python 2.3+" means. The rpm calls itself "python-2.3-52") > > > The interrupter crashed on both of the Windows machines. My Linux machine > did not crash, it simply said that the > mx.DateTime.DateTime(2065).localtime() was really 1901, which is clearly > incorrect, but better than crashing, I guess. It would appear that > localtime() is an OS-dependant thing. The problem is related to how the C lib handles these dates. localtime() uses the C lib's time functions to do the calculations and, depending on their implementation (e.g. using 32-bits to represent seconds since the epoch), these can result is wrong results for dates outside the range 1970 - 2038. FWIW, the mxDateTime version in the yet unreleased egenix-mx-base 2.1 does some extra tests to catch these situations - provided that the C lib function itself doesn't crash. > I'm not sure if this is the correct place to ask questions about bugs. I > know that there is a commercial support area, but I not currently a customer > and mx.DateTime is freely available. (FYI: I am considering the purchase > of the mxODBC module). Anyways, I can hack around this bug myself for the > time being, but I figured that this may be something that the authors would > like to fix, assuming that what I found is really a bug. A interpreter > crash is never fun. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 27 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 40 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From jpenny at universal-fasteners.com Tue Apr 27 12:28:22 2004 From: jpenny at universal-fasteners.com (Jim Penny) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! Message-ID: <20040427112822.1323b809@mcbragg.ykk-ufi.com> I am having trouble getting mxODBCA Zope Adapter to work on a current Debian (sid) machine. Details of intallation: python is debian package python2.3.3-6. Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip Zope2.7 is installed from source, and is working as long as the above adapter is not installed. the zip file was extracted in the top level of the zope2.7 home directory. That is, I have my zope directory as /home/zope/zope27, with INSTANCE_HOME /home/zope/zope27/instance. extraction was to /home/zope/zope27. I get the following in my instance's event log: 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests ------ 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM ------ 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections ------ 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections ------ 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 Removal of mxODBCZopeDA from the Products directory permits startup again. Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a locally written user folder. Under zope2.5, all of this software, except APE, is also installed, and works. Any ideas on what the problem is or how it can be debugged? Is source available under signed NDA? Thanks Jim Penny From info at egenix.com Tue Apr 27 19:11:51 2004 From: info at egenix.com (info@egenix.com) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] mxODBC Zope Adapter, Zope 2.7, Debian --> CRASH! In-Reply-To: <20040427112822.1323b809@mcbragg.ykk-ufi.com> References: <20040427112822.1323b809@mcbragg.ykk-ufi.com> Message-ID: <20040427181151.5781.24@wonderland.1083052065.fake> Dear Jim, we don't think this is an mxODBC / Zope issue but probably more low level in the Python ODBC-Manager world. Could you please try loading mx.ODBC.iODBC or .unixODBC from the Python prompt (for this to work, you may have to cd to the lib/python/ dir and have '.' in your sys.path). We assume it's some sort of glibc issue or something is wrong with the iODBC / unixODBC installation. A stack trace from the core dump would help a lot. Regards Charlie Clark PS. The source is not available not even under NDA but probably wouldn't help here anyway. On 2004-04-27 at 17:28:22 [+0200], Jim Penny wrote: > I am having trouble getting mxODBCA Zope Adapter to work on a current > Debian (sid) machine. > > Details of intallation: > > python is debian package python2.3.3-6. > Zope mxODBC adapter is egenix-mxodbc-zopeda-1.0.8.linux-i686-py2.3.zip > Zope2.7 is installed from source, and is working as long as the above > adapter is not installed. > > the zip file was extracted in the top level of the zope2.7 home > directory. That is, I have my zope directory as /home/zope/zope27, with > INSTANCE_HOME /home/zope/zope27/instance. extraction was to > /home/zope/zope27. > > I get the following in my instance's event log: > 2004-04-26T19:24:35 INFO(0) Zope Ready to handle requests > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Caught signal SIGTERM > ------ > 2004-04-27T05:46:02 INFO(0) Z2 Shutting down fast > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing FTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) ZServer closing HTTP to new connections > ------ > 2004-04-27T05:46:02 INFO(0) Zope Shutting down with exit code 0 > > Removal of mxODBCZopeDA from the Products directory permits startup > again. > > Other products installed are APE, Epoz (old), LocalFS, ZPsycopg, and a > locally written user folder. Under zope2.5, all of this software, > except APE, is also installed, and works. > > Any ideas on what the problem is or how it can be debugged? > > Is source available under signed NDA? -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Tue Apr 27 18:50:32 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: I'm trying to build the commercial package for RH9 and iODBC 3.51.2 following the instructions at http://www.egenix.com/files/python/mxODBC.html#Installation . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and edit Setup. All I do in Setup is to uncomment lines 406-409 and modify the paths to the header files & library. When I type 'make', I get the following: gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c -o ./mxSQLCodes.o gcc: cannot specify -o with -c or -S and multiple compilations make: *** [mxSQLCodes.o] Error 1 The default gcc is 3.2.2, but 2.96 is also available, and I get the same message when I alter the Makefile to make 'CC = gcc296'. I'm not using RPMs because we weren't able to install them (some strange dependency issue, and I don't know anything about how this box was set up), so this was my other option. Any hints to this C-ignorant user appreciated :) Thanks, Chuck Bearden Systems Analyst III School of Health Information Sciences University of Texas at Houston 713.500.3954 (voice) 713.500.3907 (fax) Charles.F.Bearden@uth.tmc.edu From mal at egenix.com Wed Apr 28 10:48:42 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408F61DA.7080105@egenix.com> Charles Bearden wrote: > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > following the instructions at > > http://www.egenix.com/files/python/mxODBC.html#Installation > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > edit Setup. Instead of going through the make & setup process (which is probaby broken) you should use the distutils based "python setup.py install" process. > All I do in Setup is to uncomment lines 406-409 and modify > the paths to the header files & library. When I type 'make', I get the > following: > > gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -I/usr/local/include/python2.3 -I/usr/local/include/python2.3 @DEFS@ > -DMAL_DEBUG -DWANT_UNICODE_SUPPORT -DMISSING_SETUP -c ././mxSQLCodes.c > -o ./mxSQLCodes.o > gcc: cannot specify -o with -c or -S and multiple compilations make: *** > [mxSQLCodes.o] Error 1 > > The default gcc is 3.2.2, but 2.96 is also available, and I get the same > message when I alter the Makefile to make 'CC = gcc296'. > > I'm not using RPMs because we weren't able to install them (some strange > dependency issue, and I don't know anything about how this box was set > up), so this was my other option. > > Any hints to this C-ignorant user appreciated :) > > Thanks, > > Chuck Bearden > Systems Analyst III > School of Health Information Sciences > University of Texas at Houston > 713.500.3954 (voice) > 713.500.3907 (fax) > Charles.F.Bearden@uth.tmc.edu > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Charles.F.Bearden at uth.tmc.edu Wed Apr 28 10:40:18 2004 From: Charles.F.Bearden at uth.tmc.edu (Charles Bearden) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial Message-ID: > -----Original Message----- > From: M.-A. Lemburg [mailto:mal@egenix.com] > Sent: Wednesday, April 28, 2004 2:49 AM > > Charles Bearden wrote: > > I'm trying to build the commercial package for RH9 and iODBC 3.51.2 > > following the instructions at > > > > http://www.egenix.com/files/python/mxODBC.html#Installation > > > > . I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and > > edit Setup. > > Instead of going through the make & setup process (which is probaby > broken) you should use the distutils based "python setup.py install" > process. Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? I'll go ahead and give that a try in any case. Thanks, Chuck [...] > > > > Thanks, > > > > Chuck Bearden > > Systems Analyst III > > School of Health Information Sciences > > University of Texas at Houston > > 713.500.3954 (voice) > > 713.500.3907 (fax) > > Charles.F.Bearden@uth.tmc.edu > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Apr 28 2004) > >>> Python/Zope Consulting and Support ... http://www.egenix.com/ > >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > EuroPython 2004, G?teborg, Sweden 39 days left > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Wed Apr 28 18:28:40 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] Problem building egenix-mx-commercial In-Reply-To: References: Message-ID: <408FCDA8.9060606@egenix.com> Charles Bearden wrote: >>-----Original Message----- >>From: M.-A. Lemburg [mailto:mal@egenix.com] >>Sent: Wednesday, April 28, 2004 2:49 AM >> >>Charles Bearden wrote: >> >>>I'm trying to build the commercial package for RH9 and iODBC 3.51.2 >>>following the instructions at >>> >>> http://www.egenix.com/files/python/mxODBC.html#Installation >>> >>>. I cd to the mx/ODBC/iODBC subdirectory, boot the Makefile system, and >>>edit Setup. >> >>Instead of going through the make & setup process (which is probaby >>broken) you should use the distutils based "python setup.py install" >>process. > > > Thanks for the suggestion. I was using the 'make' method because I need to ensure that my mx.Base and iODBC libraries, which are installed in non-standard locations, are used instead of the . Do I simply edit the mxCOMMERCIAL.py file to indicate the nonstandard library & header locations? Yes. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 28 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 39 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Thu Apr 29 18:05:53 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck building a separate python just for zope? Apparently Debian's python2.3 uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised to see other distros follow suit. Is there another way to deal with the issue? Thanks, Joseph Kocherhans Intermountain Injury Control Research Center From mal at egenix.com Fri Apr 30 10:06:59 2004 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] ucs2 vs ucs4 In-Reply-To: References: Message-ID: <4091FB13.2000508@egenix.com> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From Joseph.Kocherhans at hsc.utah.edu Fri Apr 30 10:05:54 2004 From: Joseph.Kocherhans at hsc.utah.edu (Joseph Kocherhans) Date: Fri Mar 31 16:33:44 2006 Subject: [egenix-users] ucs2 vs ucs4 Message-ID: Thank you! You just made my day :) Joseph Kocherhans Intermountain Injury Control Research Center >>> "M.-A. Lemburg" 4/30/2004 1:06:59 AM >>> Joseph Kocherhans wrote: > Any chance of getting a ucs4 build of mxODBCZopeDA? Or am I stuck > building a separate python just for zope? Apparently Debian's python2.3 > uses ucs4 :( I've heard that RH 9 already does. I wouldn't be surprised > to see other distros follow suit. Is there another way to deal with the > issue? Yes. Starting with version 1.0.9 we'll also ship a UCS4 version of hte Linux build. Here's a beta that you can try in the meantime: http://www.egenix.com/files/python/egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Apr 30 2004) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ EuroPython 2004, G?teborg, Sweden 37 days left ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ http://lists.egenix.com/mailman/listinfo/egenix-users